package main;

import org.newdawn.slick.*; 
import org.newdawn.slick.state.*;

import combat.Combat;

import exploration.Exploration;
import savesystem.MenuSecondaire;

public class RPGame extends StateBasedGame {

	public static final String gameName = "RPGame";
	
	public RPGame(String gameName){
		super(gameName);
		this.addState(new Menu());
		this.addState(new MenuSecondaire());
		this.addState(new Exploration());
		this.addState(new Combat());
	}
	
	public void initStatesList(GameContainer gc) throws SlickException{
		this.getState(Combat.ID).init(gc, this);
		this.getState(Exploration.ID).init(gc, this);
		this.getState(MenuSecondaire.ID).init(gc, this);
		this.getState(Menu.ID).init(gc, this);
		this.enterState(Menu.ID);
	}
	
	public static void main(String[] args){
		AppGameContainer appgc;
		try{
			appgc = new AppGameContainer(new RPGame(gameName));
			appgc.setDisplayMode(800, 600, false);
			//appgc.setShowFPS(false);
			//appgc.setTargetFrameRate(127);
			appgc.start();
		}catch(SlickException e){
			e.printStackTrace();
		}
	}
}